package com.bsj.pay.dao;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.bsj.pay.model.ChargeAccountBean;

@Mapper
public interface ChargeAccountDao extends BaseDao<ChargeAccountBean>{
	
	int addBindFailCount(Long id);
	
	double sumMoney(ChargeAccountBean chargeAccount);
	
	int getChargeSuccAmountById(Long charge_account_id);
	
	int getChargeingAmountById(@Param("charge_account_id")Long charge_account_id,@Param("query_time_out")Integer query_time_out);
	
	int batchFailByPartnerId(@Param("partner_id")Long partnerId,@Param("query_time_out")Integer query_time_out);
	
	int addChargeCount(Long id);
	
	int getLeftAmount();
	
	List<ChargeAccountBean> queryDayList(ChargeAccountBean chargeAccount);
	
	List<ChargeAccountBean> queryDayFinanceList(ChargeAccountBean chargeAccount);
	
	long failChargeCount(@Param("partner_id")Long partner_id,@Param("account")String account);
	
	int removeByTime(@Param("startTime")long startTime,@Param("endTime")long endTime);
	
	ChargeAccountBean getOneCanDispatchOrder(@Param("amount")Integer amount,@Param("query_time_out")int query_time_out);

	ChargeAccountBean getOneCanDispatchOrderEquals(@Param("amount")Integer amount,@Param("query_time_out")int query_time_out);

	//List<ChargeAccountBean> getCanDispatchOrderList(@Param("amount")Integer amount,@Param("charge_time_out")int charge_time_out);
	
	//List<ChargeAccountBean> getLeftCount(@Param("charge_time_out")int charge_time_out);
	
	//ChargeAccountBean getLeftCountByAmount(@Param("charge_time_out")int charge_time_out,@Param("amount")int amount);
	
	List<ChargeAccountBean> getNeedNotifyList(@Param("query_time_out")int query_time_out);
}
